package com.ruoyi.web.TCPtest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class TcpClientExample {

    @Resource
    private TcpClientService tcpClientService;

    public void sendMessage() {
        String response = tcpClientService.sendMessage("120.24.188.200", 8282, "Hello, Server!");
        System.out.println("Server response: " + response);
    }
}
